package com.eastfair.home.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.home.enumeration.ReportVenueSpaceReportSpaceStatusEnum;
import com.eastfair.home.enumeration.ReportVenueSpaceDrawingAuditStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 场馆一键报馆记录
 * </p>
 *
 * @author dq
 * @since 2022-09-20
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hc_report_venue_space")
@ApiModel(value = "ReportVenueSpace", description = "场馆一键报馆记录")
@AllArgsConstructor
public class ReportVenueSpace extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 报馆编号
     */
    @ApiModelProperty(value = "报馆编号")
    @Size(max = 64, message = "报馆编号长度不能超过64")
    @TableField(value = "report_venue_space_number", condition = LIKE)
    @Excel(name = "报馆编号")
    private String reportVenueSpaceNumber;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 1000, message = "备注长度不能超过1000")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "备注")
    private String remark;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    @TableField(value = "exhibition_id")
    @Excel(name = "展会ID")
    private Long exhibitionId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 100, message = "展会名称长度不能超过100")
    @TableField(value = "exhibition_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionName;

    /**
     * 展厅编码
     */
    @ApiModelProperty(value = "展厅编码")
    @Size(max = 100, message = "展厅编码长度不能超过100")
    @TableField(value = "space_code", condition = LIKE)
    @Excel(name = "展厅编码")
    private String spaceCode;

    /**
     * 展馆号
     */
    @ApiModelProperty(value = "展馆号")
    @Size(max = 100, message = "展馆号长度不能超过100")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展馆号")
    private String spaceName;

    /**
     * 建筑面积
     */
    @ApiModelProperty(value = "建筑面积")
    @TableField(value = "build_area")
    @Excel(name = "建筑面积")
    private Double buildArea;

    /**
     * 位置
     */
    @ApiModelProperty(value = "位置")
    @Size(max = 64, message = "位置长度不能超过64")
    @TableField(value = "location", condition = LIKE)
    @Excel(name = "位置")
    private String location;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称")
    @Size(max = 100, message = "分类名称长度不能超过100")
    @TableField(value = "category_name", condition = LIKE)
    @Excel(name = "分类名称")
    private String categoryName;

    /**
     * 主场ID
     */
    @ApiModelProperty(value = "主场ID")
    @TableField(value = "home_court_id")
    @Excel(name = "主场ID")
    private Long homeCourtId;

    /**
     * 主场名称
     */
    @ApiModelProperty(value = "主场名称")
    @Size(max = 100, message = "主场名称长度不能超过100")
    @TableField(value = "home_court_name", condition = LIKE)
    @Excel(name = "主场名称")
    private String homeCourtName;

    /**
     * 报馆图纸审核总状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}
     */
    @ApiModelProperty(value = "报馆图纸审核总状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}")
    @TableField(value = "drawing_audit_status")
    @Excel(name = "报馆图纸审核总状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}", replace = {"未提交_NOT_SUBMIT", "已提交_SUBMIT", "审核通过_APPROVED", "审核未通过_NOT_APPROVED",  "_null"})
    private ReportVenueSpaceDrawingAuditStatusEnum drawingAuditStatus;

    /**
     * 报馆图纸审核总意见
     */
    @ApiModelProperty(value = "报馆图纸审核总意见")
    @Size(max = 200, message = "报馆图纸审核总意见长度不能超过200")
    @TableField(value = "drawing_audit_opinion", condition = LIKE)
    @Excel(name = "报馆图纸审核总意见")
    private String drawingAuditOpinion;

    /**
     * 报馆状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}
     */
    @ApiModelProperty(value = "报馆状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}")
    @TableField(value = "report_space_status")
    @Excel(name = "报馆状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;APPROVED:审核通过;NOT_APPROVED:审核未通过}", replace = {"未提交_NOT_SUBMIT", "已提交_SUBMIT", "审核通过_APPROVED", "审核未通过_NOT_APPROVED",  "_null"})
    private ReportVenueSpaceReportSpaceStatusEnum reportSpaceStatus;

    /**
     * 最后提交时间
     */
    @ApiModelProperty(value = "最后提交时间")
    @TableField(value = "last_report_time")
    @Excel(name = "最后提交时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime lastReportTime;

    /**
     * 最后审核时间
     */
    @ApiModelProperty(value = "最后审核时间")
    @TableField(value = "last_audit_time")
    @Excel(name = "最后审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime lastAuditTime;

    /**
     * 图纸审核人id
     */
    @ApiModelProperty(value = "图纸审核人id")
    @TableField(value = "drawing_audit_user_id")
    @Excel(name = "图纸审核人id")
    private Long drawingAuditUserId;

    /**
     * 图纸审核人姓名
     */
    @ApiModelProperty(value = "图纸审核人姓名")
    @Size(max = 100, message = "图纸审核人姓名长度不能超过100")
    @TableField(value = "drawing_audit_user_name", condition = LIKE)
    @Excel(name = "图纸审核人姓名")
    private String drawingAuditUserName;


    @Builder
    public ReportVenueSpace(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String reportVenueSpaceNumber, String remark, Long exhibitionId, String exhibitionName, String spaceCode, String spaceName, 
                    Double buildArea, String location, String categoryName, Long homeCourtId, String homeCourtName, ReportVenueSpaceDrawingAuditStatusEnum drawingAuditStatus, 
                    String drawingAuditOpinion, ReportVenueSpaceReportSpaceStatusEnum reportSpaceStatus, LocalDateTime lastReportTime, LocalDateTime lastAuditTime, Long drawingAuditUserId, String drawingAuditUserName) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.reportVenueSpaceNumber = reportVenueSpaceNumber;
        this.remark = remark;
        this.exhibitionId = exhibitionId;
        this.exhibitionName = exhibitionName;
        this.spaceCode = spaceCode;
        this.spaceName = spaceName;
        this.buildArea = buildArea;
        this.location = location;
        this.categoryName = categoryName;
        this.homeCourtId = homeCourtId;
        this.homeCourtName = homeCourtName;
        this.drawingAuditStatus = drawingAuditStatus;
        this.drawingAuditOpinion = drawingAuditOpinion;
        this.reportSpaceStatus = reportSpaceStatus;
        this.lastReportTime = lastReportTime;
        this.lastAuditTime = lastAuditTime;
        this.drawingAuditUserId = drawingAuditUserId;
        this.drawingAuditUserName = drawingAuditUserName;
    }

}
